package com.haixiaoke.saas.workOrder.mapper;

import com.haixiaoke.saas.workOrder.domain.WorkOrderRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 工单跟进记录Mapper接口
 *
 * @author qixi
 * @date 2024-09-03
 */
public interface WorkOrderRecordMapper {
    /**
     * 查询工单跟进记录
     *
     * @param recordId 工单跟进记录主键
     * @return 工单跟进记录
     */
    WorkOrderRecord selectWorkOrderRecordByRecordId(Long recordId);

    /**
     * 查询工单跟进记录列表
     *
     * @param workOrderRecord 工单跟进记录
     * @return 工单跟进记录集合
     */
    List<WorkOrderRecord> selectWorkOrderRecordList(WorkOrderRecord workOrderRecord);

    /**
     * 新增工单跟进记录
     *
     * @param workOrderRecord 工单跟进记录
     * @return 结果
     */
    int insertWorkOrderRecord(WorkOrderRecord workOrderRecord);

    /**
     * 修改工单跟进记录
     *
     * @param workOrderRecord 工单跟进记录
     * @return 结果
     */
    int updateWorkOrderRecord(WorkOrderRecord workOrderRecord);

    /**
     * 删除工单跟进记录
     *
     * @param recordId 工单跟进记录主键
     * @return 结果
     */
    int deleteWorkOrderRecordByRecordId(Long recordId);

    /**
     * 批量删除工单跟进记录
     *
     * @param recordIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteWorkOrderRecordByRecordIds(Long[] recordIds);

    /**
     * 批量新增工单跟进记录
     * @param workOrderRecordList   工单跟进记录集合
     * @return
     */
    int insertBatchWorkOrderRecord(List<WorkOrderRecord> workOrderRecordList);

    List<WorkOrderRecord> selectWorkOrderRecordByWorkOrderId(String workOrderId);

    WorkOrderRecord selectWorkOrderRecordByRecordTypeAndUserDisplayType(@Param("workOrderId") String workOrderId,
                                                                        @Param("recordType") String recordType,
                                                                        @Param("userDisplayType") String userDisplayType);

    List<WorkOrderRecord> selectWorkOrderRecordByRecordType(@Param("workOrderId") String workOrderId, @Param("recordType") String recordType);

}
